import request from "@/utils/request";

// 上传图片
export function uploadApi(data) {
  return request({
    headers: { "Content-Type": "multipart/form-data" },
    url: "/photo/minio/upload",
    method: "POST",
    data,
  });
}

// 图片列表
export function getImageListApi(params) {
  return request({
    url: "/photo/list",
    method: "GET",
    params,
  });
}

// 删除图片
export function deleteImageApi(id) {
  return request({
    url: `/photo/deletePhoto/${id}`,
    method: "DELETE",
  });
}

// 图片详情
export function getImgDetailApi(id) {
  return request({
    url: `/photo/selectPhoto/${id}`,
    method: "GET",
  });
}

// 查看高清图片地址
export function highDefinitionImagesApi(id) {
  return request({
    url: `/photo/selectPhotoUrlGQ/${id}`,
    method: "GET",
  });
}

// 一键推送
export function oneClickPushApi(data) {
  return request({
    url: "/photo/PushPhotos",
    method: "PUT",
    data,
  });
}
